<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCpmsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cpms', function (Blueprint $table) {
            $table->increments('id');
            $table->string('cpm_date')->index('cpm_date');
            $table->string('cpm_hour')->index('cpm_hour');
            $table->string('cpm_interval')->index('cpm_interval');
            $table->string('ad_position_id')->index('ad_position_id');
            $table->string('ad_provider_id')->index('ad_provider_id');
            $table->integer('ctr_val');
            $table->integer('cpm_val');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cpms');
    }
}
